package generic;

import java.util.Collection;

/**
 * Created by butterfly on 2018/6/13.
 */
public class GenericMethodDemo {
    //泛型方法需要带有一个T类型形参
    static <T> void fromArrayToCollection(T[] a, Collection<T> c){
        for (T t : a) {
            c.add(t);
        }
    }
}
